<div class="bg-light lter b-b wrapper-md">
    <div><h1 class="m-n font-thin h3">流程列表</h1></div>
</div>
<div class="" ng-controller="bpmProcessListController">
  <div class="panel panel-default">
    <div class="panel-body b-b b-light">
      过滤: <input id="filter" type="text" class="form-control input-sm w-sm inline m-r"/>
    </div>
    <div>
      <table class="table m-b-none" ui-jq="footable" data-filter="#filter" data-page-size="10">
        <thead>
			<tr>
				<th data-toggle="true">流程定义ID</th>
				<th>部署ID</th>
				<th data-hide="phone,tablet">流程定义名称</th>
				<th data-hide="phone,tablet">流程定义KEY</th>
				<th data-hide="all">流程描述</th>
				<th data-sort-ignore="true">版本号</th>
				<th data-sort-ignore="true">流程图</th>
				<th data-hide="phone,tablet" data-sort-ignore="true">候选启动</th>
				<th data-hide="all">候选启动人</th>
				<th data-hide="all">候选启动组</th>
				<th data-sort-ignore="true">操作</th>
			</tr>
		</thead>
        <tbody>
          <tr ng-repeat="df in definitions" >
              <td ng-bind="df.id"></td>
              <td ng-bind="df.deploymentId"></td>
              <td ng-bind="df.name"></td>
              <td ng-bind="df.key"></td>
              <td ng-bind="df.description"></td>
              <td ng-bind="df.version"></td>
              <td>
                  <a target="_blank" title="资源名称：{{df.resourceName }}"
                         href='bpm/resource/read.do?pdid={{df.id}}&resourceName={{df.diagramResourceName }}'>单击查看</a>
              </td>
              <td>
                  <span ng-if="linksMap[df.id].user.length > 0">{{linksMap[df.id].user.length}}人</span>
                  <span ng-if="linksMap[df.id].group.length > 0">{{linksMap[df.id].group.length}}组</span>
              </td>
              <td>
                  <span ng-repeat="user in linksMap[df.id].user">{{user.firstName}} {{user.lastName}} </span>
              </td>
              <td>
                  <span ng-repeat="group in linksMap[df.id].group">{{group.name}} </span>
              </td>
              <td>
                  <a class="btn btn-small" ui-sref="app.bpm.manager.processStart({processDefinitionId:'{{df.id}}'})"><i class="glyphicon glyphicon-play"></i>启动</a>
              </td>
          </tr>
        </tbody>
        <tfoot class="hide-if-no-paging">
          <tr>
              <td colspan="11" class="text-center">
                  <div class="pull-right">
                      <ul class="pagination"></ul>
                  </div>
              </td>
          </tr>
        </tfoot>
      </table>
    </div>
  </div>
</div>